<template>
	<div class="homePage">
		<diy-view />
		
	</div>


</template>

<script>
	import { InitShare, weixinShare } from '@jssdk'
	import resLoader from '@common/resLoader'
	import { sources } from '@common/resLoader/resSources'
	
	import DiyView from './components/diy-view'
	
	export default {
		name: 'index',
		components: {
			DiyView
		},
		data(){
			return{
			
			}
		},
		created() {
		},
		mounted(){
			// this._initShare()
			// this._initResLoader()
		},
		methods:{
			_initShare () {
				// 分享
				InitShare().then(() => {
					const shareMsg = {
						// 分享标题
						title: '',
						// 分享链接
						link: '',
						// 分享图
						image: '',
						// 分享简介
						desc: ''
					} 
					weixinShare(shareMsg)
				})
			},
			_initResLoader () {
				const loader = new resLoader({
					resources: sources,
					baseUrl: '',
					onStart: function (total) {
						console.log("staty:" + total)
					},
					onProgress: (current, total) => {
						console.log(current, total)
					},
					onComplete: (total) => {
						console.log("加载完毕:" + total + "个资源")
					}
				})
				loader.start()
			}
		}
	}
</script>

<style lang="scss" scoped>
	.homePage{
		width: 100%;
		height: 100%;
		min-height: 100vh;
		position: relative;
	}
</style>
